package com.codejam.pagehelper.starter.controller.dto.req;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Test1Req {

    @NotNull(message = "age can not be null")
    @Positive(message = "age must greater than 0")
    private Integer age;

    @NotEmpty(message = "name can not be empty")
    @Pattern(regexp = "zhangsan$",message = "pattern not match")
    private String name;
}
